<h1>Listing stores</h1>

<table>
  <tr>
    <th>Company</th>
    <th>Code</th>
    <th>Location</th>
    <th>Zipcode</th>
  </tr>

<% for store in @stores %>
  <tr>
    <td><%=h store.company.name %></td>
    <td><%=h store.code %></td>
    <td><%=h store.location %></td>
    <td><%=h store.zipcode %></td>
    <td><%= link_to image_tag("view.gif"), store %></td>
    <td><%= link_to image_tag("edit.gif"), edit_store_path(store) %></td>
    <td><%= link_to image_tag("delete.gif"), store, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New store', new_store_path %>
